let Todolist = (
    function () {
        //私有变量
        let tasks = JSON.parse(localStorage.getItem('tasks')) || []

        function saveToLoalStorage() {
            localStorage.setItem('tasks', JSON.stringify(tasks))
        }
        function renderTasks(filteredTasks) {

        }
        //添加
        function addTask(text) {

        }
        //删除
        function removeTask(id) {

        }
        //改变状态
        function changeStatus(id,completed){

        }
        //分类
        function filteredTasks(filter){

        }
        //统计
        function updateCount(){

        }
        return {
            saveToLoalStorage: saveToLoalStorage,
            addTask: addTask,
            renderTasks: renderTasks,
            removeTask: removeTask,
            changeStatus:changeStatus,
            filteredTasks:filteredTasks,
            updateCount:updateCount,
        }
    }


)();